<html><head><title>ExtractJSONArray</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">ExtractJSONArray()</font></b></p>
<p><b>Syntax</b></p><blockquote>
<font color="#006666"><b>ExtractJSONArray</b></font>(JSONValue, Array())</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Extract elements from the given JSON value of <a href="jsontype.html">type</a> <font color="#924B72">#PB_JSON_Array</font> into 
the specified Array(). The array will be resized to the number of elements contained 
in the JSON value. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>JSONValue</i></td>
<td width="90%"> 
The JSON value. The value must be of type <font color="#924B72">#PB_JSON_Array</font>. 

</td></tr>
<tr><td><i>Array()</i></td>
<td> 
The array to fill with the JSON elements. The array will be resized to have the same size 
as the JSON value. Any previous content of the array will be lost. 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>
None.


</blockquote><p><b>Remarks</b></p><blockquote>

The extraction is performed recursively if the array has a structure type. 
If the JSON value contains any elements that do not have the proper type to match 
the Array(), they will be ignored and the corresponsing array element will be 
left empty. 
<br>
<br>
If the specified Array() has more than one dimension, the JSON data is expected to 
be a nested array of arrays to represent the multi-dimensional data. See the below 
example for more details. 

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2"><font color="#006666">  ParseJSON</font>(0, "[1, 3, 5, 7, 9]")
  
  <b><font color="#006666">Dim</font></b> <font color="#006666">a</font>(0)
<font color="#006666">  ExtractJSONArray</font>(<font color="#006666">JSONValue</font>(0),<font color="#006666"> a</font>())
  
  <b><font color="#006666">For</font></b> i = 0 <b><font color="#006666">To</font></b> <font color="#006666">ArraySize</font>(<font color="#006666">a</font>())
    <b><font color="#006666">Debug</font></b> <font color="#006666">a</font>(i)
  <b><font color="#006666">Next</font></b> i
</font></pre>

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2"><font color="#006666">  ParseJSON</font>(0, "[[0, 1, 2], [3, 4, 5], [6, 7, 8]]")
  
  <b><font color="#006666">Dim</font></b> <font color="#006666">a</font>(0, 0)
<font color="#006666">  ExtractJSONArray</font>(<font color="#006666">JSONValue</font>(0),<font color="#006666"> a</font>())
  
  <b><font color="#006666">For</font></b> x = 0 <b><font color="#006666">To</font></b> 2
    <b><font color="#006666">For</font></b> y = 0 <b><font color="#006666">To</font></b> 2
      <b><font color="#006666">Debug</font></b> <font color="#006666">a</font>(x, y)
    <b><font color="#006666">Next</font></b> y
  <b><font color="#006666">Next</font></b> x
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="extractjsonlist.html">ExtractJSONList()</a>, <a href="extractjsonmap.html">ExtractJSONMap()</a>, <a href="extractjsonstructure.html">ExtractJSONStructure()</a>, 
<a href="insertjsonarray.html">InsertJSONArray()</a>, <a href="insertjsonlist.html">InsertJSONList()</a>, <a href="insertjsonmap.html">InsertJSONMap()</a>, <a href="insertjsonstructure.html">InsertJSONStructure()</a>, 
<a href="setjsonarray.html">SetJSONArray()</a>, <a href="jsontype.html">JSONType()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=exportjsonsize.html>ExportJSONSize()</a> - <a href=index.html>Json Index</a> - <a href=extractjsonlist.html>ExtractJSONList()</a> ->

</body></html>